setupSubscription
HTTP method: POST
Use the setupSubscription method as a shortcut for calling the reservation method with type = subscription for payments using the full credit card details.
| Test URL | https://testgateway.altapaysecure.com/merchant/API/<method> |
| Production URL | https://<YourShopName>.altapaysecure.com/merchant/API/<method> |
The method has the exact same parameter specification as reservation, but the type parameter is always set to subscription, even if you specify a different type in the method call. For more information, see reservation.
For details about setting up a subscription, see Setup Agreement.
NB. Please note that when setting up a agreement the amount has to be positive.
Request
curl --request POST \
--url https://<YourShopName>.altapaysecure.com/merchant/API/setupSubscription \
--header 'Authorization: Basic auth' \
--data 'terminal=Pensio Terminal' \
--data shop_orderid=abc123 \
--data amount=42.75 \
--data currency=EUR \
--data cardnum=4111111111111111 \
--data emonth=08 \
--data eyear=2025 \
--data cvc=123 \
Next Steps
After creating a subscription, you can:
- charge the subscription using the chargeSubscription method.
- reserve the subscription charge using the reserveSubscriptionCharge method.